package com.company.cloud.acct;


import com.alibaba.druid.pool.DruidDataSource;
import com.baomidou.mybatisplus.autoconfigure.ConfigurationCustomizer;
import com.baomidou.mybatisplus.core.MybatisConfiguration;
import com.company.cloud.common.utils.LocalDateTimeUtils;
import org.apache.ibatis.mapping.ResultSetType;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;
import org.springframework.jdbc.core.JdbcTemplate;

//@Configuration
public class DatabaseConfiguration {


//      @Bean
//      public ConfigurationCustomizer configurationCustomizer(){
//        System.out.println("**********ConfigurationCustomizer***********");
//          return new ConfigurationCustomizer() {
//              @Override
//              public void customize(MybatisConfiguration configuration) {
//                  configuration.setDefaultResultSetType(ResultSetType.SCROLL_SENSITIVE);
//              }
//          };
//      }

//      @Bean
//      public WangInterceptor wangInterceptor(){
//        System.out.println("***************wangInterceptor************");
//        return new WangInterceptor();
//      }


//    @Bean
//    @ConfigurationProperties(prefix = "spring.datasource")
//    public DruidDataSource druidDataSource() {
//        return new DruidDataSource();
//    }
//
//    @Primary
//    @Bean("dataSource")
//    public TxcDataSource dataSource(DruidDataSource druidDataSource) {
//        TxcDataSource txcDataSource=new TxcDataSource(druidDataSource);
//        return txcDataSource;
//    }

//    @Bean
//    public JdbcTemplate jdbcTemplate(TxcDataSource dataSource) {
//        return new JdbcTemplate(dataSource);
//    }







}
